import requests

from base.base_request import MerRequests
from base.base_url import MerchantOrderUrl


class MerchantOrder(MerRequests, MerchantOrderUrl):

    def mer_order_list(self):  # 订单列表
        params = {
            'status': 'all',
            'dateLimit': '',
            'orderNo': '',
            'page': '1',
            'limit': '20',
            'type': '',
            'searchType': 'all',
            'content': '',
            'temp': '1761824807',
        }
        return self.get(self.mer_order_list.__name__,url=self.KEY_order_list, params=params)

    def mer_Refund_order_list(self):  # 退款订单列表
        params = {
            'refundStatus': '9',
            'dateLimit': '',
            'orderNo': '',
            'refundOrderNo': '',
            'page': '1',
            'limit': '20',
            'searchType': 'all',
            'content': '',
            'trackingNumber': '',
            'temp': '1761824924',
        }
        return self.get(self.mer_Refund_order_list.__name__,url=self.KEY_Refund_order_list, params=params)

    def mer_overView(self):  # 预约看板
        params = {
            'reservationDate': '2025-10-30',
            'reservationKeyword': '',
            'serviceType': '',
            'serviceStatus': '2,3,4',
            'temp': '1761825074',
        }
        return self.get(self.mer_overView.__name__,url=self.KEY_overView, params=params)

    def mer_workOrders(self):  # 预约订单列表
        params = {
            'status': '0',
            'dateLimit': '',
            'orderNo': '',
            'page': '1',
            'limit': '20',
            'serviceType': '',
            'searchType': 'all',
            'content': '',
            'workOrderNo': '',
            'temp': '1761825308',
        }
        return self.get(self.mer_workOrders.__name__,url=self.KEY_workOrders, params=params)


if __name__ == '__main__':
    mer_order = MerchantOrder()
    print(mer_order.mer_order_list())
    print(mer_order.mer_Refund_order_list())
    print(mer_order.mer_overView())
    print(mer_order.mer_workOrders())
